﻿namespace FetchesDeploy.ScalableFactory.ServingProvider
{
    /// <summary> 
    /// 定制完Fetches.Custom后和Container一起打包,由ServingProvider负责分发,一个任务的Fetcher可能分布在几个Container中
    /// </summary>
    interface IServingProvider
    {
        /// <summary>
        /// 将程序包打包为ServingProvider使用的格式并发布到ServingProvider
        /// </summary>
        /// <param name="applicationFile">程序包.zip文件</param>
        /// <returns>ServingProvider运行该程序包所需的程序名称</returns>
        ServingPackage Publish(string applicationFile);

        ServingResult Run(ServingPackage package);
    }
}
